package com.kay.clientInfo.bboss.bulk;

import org.frameworkset.elasticsearch.ElasticSearchHelper;
import org.frameworkset.elasticsearch.client.ClientInterface;
import org.frameworkset.elasticsearch.client.ClientUtil;

/**
 * Created by Kay on 2018/11/1
 */
public class BulkClientInfo {
    // bulk basic
    public static void BulkBasic(){
        ClientInterface clientUtil = ElasticSearchHelper.getConfigRestClientUtil("esmapper/Client_Info.xml");

        clientUtil.executeHttp("client_info/basic/_bulk","bulkImportBasicData", ClientUtil.HTTP_POST);
    }

    // bulk basic
    public static void BulkBasic2(){
        ClientInterface clientUtil = ElasticSearchHelper.getConfigRestClientUtil("esmapper/Client_Info2.xml");

        clientUtil.executeHttp("client_info2/basic/_bulk","bulkImportBasicData", ClientUtil.HTTP_POST);
    }

    // Bulk Diagnosis
    public static void BulkDiagnosis(){
        ClientInterface clientUtil = ElasticSearchHelper.getConfigRestClientUtil("esmapper/Client_Info.xml");

        clientUtil.executeHttp("client_info/diagnosis/_bulk?refresh","bulkImportDiagnosisData", ClientUtil.HTTP_POST);
    }

    //BulkMedical
    public static void BulkMedical(){
        ClientInterface clientUtil = ElasticSearchHelper.getConfigRestClientUtil("esmapper/Client_Info.xml");

        clientUtil.executeHttp("client_info/medical/_bulk?refresh","bulkImportMedicalData", ClientUtil.HTTP_POST);
    }

    // BulkExam
    public static void  BulkExam(){
        ClientInterface clientUtil = ElasticSearchHelper.getConfigRestClientUtil("esmapper/Client_Info.xml");

        clientUtil.executeHttp("client_info/exam/_bulk?refresh","bulkImportExamData", ClientUtil.HTTP_POST);
    }


    // Bulk DetailData
    public static void DetailData(){
        ClientInterface clientUtil = ElasticSearchHelper.getConfigRestClientUtil("esmapper/Client_Info2.xml");

        clientUtil.executeHttp("client_info2/detaildata/_bulk?refresh","bulkImportDetailData", ClientUtil.HTTP_POST);
    }
}
